package com.bgs.microservices.service.system;

import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * 此项目是系统级模块 包含基础的用户管理 角色管理 菜单管理 字典管理 系统信息管理类
 * scanBasePackages 扫描数组包含本项目的包 还有common公共包下的openfeign包
 * 因为openfeign是公共服务调度包能够被其他项目共同调用，不属于单独的哪个服务项目，
 * 所以需要被使用openfeign的项目扫描到
 */
@MapperScan(basePackages = "com.bgs.microservices.service.system.*.mapper")
@SpringBootApplication(scanBasePackages ={"com.bgs.microservices.service.system","com.bgs.microservices.service.common.openfeign","com.bgs.microservices.service.common.config","com.bgs.microservices.service.common.security"} )
@EnableFeignClients(basePackages = "com.bgs.microservices.service.common.openfeign")
// 设置spring doc 接口文档可以权限认证
@SecurityScheme(name = "api_token", type = SecuritySchemeType.HTTP, scheme ="bearer", in = SecuritySchemeIn.HEADER)
public class MicroservicesServiceSystemApplication {
	public static void main(String[] args) {
		SpringApplication.run(MicroservicesServiceSystemApplication.class, args);
	}

}
